package org.syntaxlisp.core.element;

import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class DefID {

    private final String def;

    private final int id;

    public int hashCode () {
        return id;
    }

    public String toString () {
        return def + "-" + id;
    }

    public boolean equals (Object other) {
        return other instanceof DefID
               && (((DefID) other).getId() == id);
    }
}
